using System;
using System.Globalization;
using System.Windows.Data;

namespace OpenLS.Spreadsheet.UI
{class PixesToInchesConverter: IValueConverter
{
    static string GetValue (double d)
	{
		return string.Format ("{0}''", d / 96);

	}

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return GetValue(System.Convert.ToDouble(value));
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotSupportedException();
    }
}}